1. Field of the Invention
The present invention relates to a bar code reader and a bar code reading method reading a bar code based on a variation of reflected light quantity obtained by scanning the bar code.
2. Description of the Related Art
In late years, it generalized that items for sale are managed by the bar code as represented by the POS (point-of-sale) system in distribution business or the like. For example, in the POS system in a store, information such as a kind and a price of an item is coded into a bar code, and the bar code is printed on the item. At the checkout counter, the scanning light is irradiated on the bar code, the quantity of the reflected light is detected, and data coded into the bar code is read, whereby the payment for the items is cleared based on the data. At the same time, the sales number of the item is added up in real time, and it is used for inventory control and stock control.
Such bar codes are roughly classified into the WPC code such as the JAN code, the UPC code and the EAN code, and the second code of variable length.
Among these, the WPC code is provided with a start guard bar (SGB) added to the leftmost edge, the center bar (CB) inserted in an intermediate part and the end guard bar (EGB) added to the rightmost edge, and is stored with a left data block including 6 or 4 data characters between the start guard bar and the center bar, and with a right data block including 6 or 4 data characters between the center bar and the end guard bar.
Further, concerning the WPC code, there is a WPC code called 13-digit bar code. In this 13-digit bar code, each character in the left data block is represented by an even parity character (the character in which the number of modules of two black bars is even) or an odd parity character (the character in which the number of modules of two black bars is odd), and a value corresponding the is combination of the even parities and the odd parities is represented as the 13th character (flag character), whereby the 13-digit information is kept.
Accordingly, in order to demodulate the flag character in the 13-digit bar code, it is necessary to complete the normal demodulation of 6-digit data characters in the left data block at least.
According to the standard of the WPC code, when 12 pieces of data in the 13-digit bar code are alternately classified as odd portions and as even portions in a condition that the rightmost character is classified as the odd portion (the flag character is classified as the odd portion), the sum of three time of the total of the numeral values of the data characters in the odd portions and the total of the numeral values of the data characters in the even portions becomes an integral multiple of 10. By using this standard, it is easily possible to confirm whether the demodulated data corresponding to the bar code is reproduced when a plurality of the demodulated data obtained by the block reading are combined. Such an confirmation is called "modulus 10 check".
Accordingly, the 6-digit data characters in the right data block must be completely demodulated normally in order to execute this modulus 10 check.
However, a bar code reader cannot read the bar code accurately when there are creases on a bag and paper to which the bar code is printed or when the bar code is printed out of position. Further, though the reflected light received by the bar code reader is a diffusive reflected light on the bar code surface, there is a case that the bar code receives not enough reflected light of the light quantity corresponding to the color of each bar in the bar code according to the condition of the bar code surface.
In such cases, when only one character is not demodulated in failure, it is impossible to calculate 13th character and to execute the modulus 10 check with only data obtained by the scanning in this condition. As a result, it is necessary to read the same bar code many times, and to join small pieces of data respectively obtained.